<?php if ( ! defined('BASEPATH')) exit('No direct script access allowed');

class Index extends CI_Controller {

	public function __construct(){
		session_start();
		parent::__construct();
	}

	public function index()
	{
		if (isset($_SESSION['user_name'])&&$_SESSION['user_name']!="") {
			redirect(base_url()."index.php/common_main");
		}

		if (isset($_COOKIE['user_name'])) {
			$data['user_name']=$_COOKIE['user_name'];
		}else {
			$data['user_name']="";
		}
		$this->load->view('common/login',$data);
		
	}

	/**
	 *
	 *
		* @name demo
		* @date 2013-1-8
		* @author eifel
		* @param
		* @return
		* @version 1.0
		* @description 留下一个展示UI的页面
	 */
	public function demo() {
		$this->load->view('demo');
	}
}

/* End of file index.php */
/* Location: ./application/controllers/index.php */